<%@ page import="myschool.service.GradeService" %>
<%@ page import="myschool.entity.Grade" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2022/7/4
  Time: 18:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>学科管理系统</title>
    <link rel="stylesheet" href="css/public.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>
    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>学科管理页面 >> 学科添加页面</span>
        </div>
        <div class="providerAdd">
            <form action="doSubjectAdd.jsp">
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div class="">
                    <label for="billId">学科名称：</label>
                    <input type="text" name="sbname" id="billId" required/>
                    <span>*请输入学科名称</span>
                </div>
                <div>
                    <label for="billName">学时：</label>
                    <input type="text" name="sbhour" id="billName" required/>
                    <span >*请输入学时</span>
                </div>
                <div>
                    <label for="billCom">年级名称：</label>
                    <select id="billCom" name="sbgid"><%
                        List<Grade> grades = GradeService.ME.findALL();
                        for (Grade g : grades) {
                    %>
                        <option  value="<%=g.getId()%>"><%=g.getName()%>
                        </option>
                        <%}%>
                    </select>
                    <span>*请选择对应的年级名称</span>
                </div>
                <div class="providerAddBtn">
                    <input type="submit" value="保存" />
                    <input type="button" value="返回" onclick="history.back(-1)"/>
                </div>
            </form>
        </div>

    </div>
</section>
</body>
</html>
